package com.lanchetech.dao;

import com.lanchetech.bean.request.PageReq;
import com.lanchetech.entity.TenantWithdraw;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Mapper
public interface TenantWithdrawMapper {
    int deleteByPrimaryKey(Long id);

    int insert(TenantWithdraw record);

    int insert2(TenantWithdraw record);

    int insertSelective(TenantWithdraw record);

    TenantWithdraw selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(TenantWithdraw record);

    int updateByPrimaryKey(TenantWithdraw record);

    List<TenantWithdraw> findAllPage(PageReq req);

    BigDecimal sumByStatus(@Param("status") Integer status);

    BigDecimal sumByStatusAndTenantId(@Param("status") Integer status, @Param("tenantId") Long tenantId);

    int updateStatusAndUpdatedAtById(@Param("updatedStatus") Integer updatedStatus, @Param("updatedUpdatedAt") Date updatedUpdatedAt, @Param("id") Long id);

}